package org.NooLab.glue.components;

import org.NooLab.compare.CompareIntf;
import org.NooLab.glue.msgframe.MetaRegistration;
import org.NooLab.glue.net.BoardAddresses;
import org.NooLab.glue.net.env.ConnectionsManager;
import org.NooLab.glue.storage.MsgBoardDataStorage;


/**
 * 
 * this object is mainly needed to drive two different protocols;
 * This is accomplished by creating two instances of the internal MessageBoard,
 * which create their own ComboxFactory, own listeners etc.
 * 
 * In order to route a message from one protocol to the other, 
 * - the XRegistratoin has to know about its protocolID
 * - a high-level object has to administer the global variables like 
 *   instance ID, transaction receipts 
 *   
 * A send-action then is selecting the protocol that is defined in
 * the XRegistration
 * 
 */
public class MessageBoardShare implements MessageBoardShareIntf {

	// =================================

	// object references ..............
	
	GlobalReceipts globalReceipts ; 
	
	MsgBoardDataStorage msgBoardStorage ;
	 
	MetaRegistration metaRegistration ;
	
	MessageBoardFactory msgBoardFactory ;
	
	BoardAddresses boardAddresses;
	
	CompareIntf compareInstance=null;
	
	// helper objects .................

	

	// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
	public MessageBoardShare( MessageBoardFactory factory){
		msgBoardFactory = factory;
	}
	
	// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
 

	public GlobalReceipts getGlobalReceipts() {
		return globalReceipts;
	}



	public void setGlobalReceipts(GlobalReceipts globalReceipts) {
		this.globalReceipts = globalReceipts;
	}



	public MsgBoardDataStorage getMsgBoardStorage() {
		return msgBoardStorage;
	}



	public void setMsgBoardStorage(MsgBoardDataStorage msgBoardStorage) {
		this.msgBoardStorage = msgBoardStorage;
	}



	public MetaRegistration getMetaRegistration() {
		return metaRegistration;
	}


	public CompareIntf getCompareKernel() {
		return compareInstance;
	}
	
	public void setMetaRegistration(MetaRegistration metaRegistration) {
		this.metaRegistration = metaRegistration;
	}

	public MessageBoardFactory getMsgBoardFactory() {
		return msgBoardFactory;
	}

	public BoardAddresses getBoardAddresses() {
		return boardAddresses;
	}

	public void setBoardAddresses(BoardAddresses boardAddresses) {
		this.boardAddresses = boardAddresses;
	}
	
	public void setCompareKernel( CompareIntf compare ){
	
		compareInstance = compare;
		 
	}
	
}
